<script setup lang="ts">
import { io } from "socket.io-client";
import { ref } from "vue";

defineProps<{ app: string; version: string }>();

const socketId = ref('');
const socket = io("http://localhost:3002",{
    path: "/app"
});
socket.on("connect", () => {
  console.log("连接成功，id：" + socket.id);
  socketId.value = socket.id as string;
//   socket.on("clientsChange", (e) => {
//     clients.value = e;
//   });
});
</script>

<template>
  <div class="mock-client">
    <div>
      <div>app：{{ app }}</div>
      <div>version：{{ version }}</div>
    </div>
  </div>
</template>

<style scoped>
.mock-client {
  width: 40%;
  height: 200px;
  background-color: rgb(120, 206, 107);
  margin-top: 10px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
</style>
